#include "Skill.h"

bool Skill::isMasterSkill(int skillid)
{
	//if (masterlevel > 0) {
	//	return true;
	//}
	int jobid = skillid / 10000;
	int i = 0;
	switch (jobid) {
	case 112: {
		int skills[] = {1120003, 1120004, 1121000, 1121001, 1121002, 1121006, 1121008, 1121010, 1121011};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 122: {
		int skills[] = {1220005, 1220006, 1220010, 1221000, 1221002, 1221004, 1221007, 1221009, 1221011, 1221012};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 132: {
		int skills[] = {1320005, 1320006, 1320008, 1320009, 1321000, 1321001, 1321002, 1321003, 1321007, 1321010};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 212: {
		int skills[] = {2121000, 2121001, 2121002, 2121003, 2121004, 2121005, 2121006, 2121007, 2121008};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 222: {
		int skills[] = {2221000, 2221001, 2221002, 2221003, 2221004, 2221005, 2221006, 2221007, 2221008};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 232: {
		int skills[] = {2321000, 2321001, 2321002, 2321003, 2321004, 2321005, 2321006, 2321007, 2321008, 2321009};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 312: {
		int skills[] = {3120005, 3121000, 3121002, 3121003, 3121004, 3221003, 3121006, 3121007, 3121008, 3121009};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 322: {
		int skills[] = {3221003, 3220004, 3221000, 3221001, 3221002, 3221005, 3221006, 3221007, 3221008};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 412: {
		int skills[] = {4120002, 4120005, 4121000, 4121003, 4121004, 4121006, 4121007, 4121008, 4121009};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 422: {
		int skills[] = {4220002, 4220005, 4221000, 4221001, 4221003, 4221004, 4221006, 4221007, 4221008};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 431: {
		if (skillid == 4311003) {
			return true;
		}
		break;
	} case 432: {
		if (skillid == 4321000) {
			return true;
		}
		break;
	} case 433: {
		int skills[] = {4331002, 4331005};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 434: {
		int skills[] = {4341000, 4340001, 4341002, 4341003, 4341004, 4341005, 4341006, 4341007, 4341008};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 512: {
		int skills[] = {5121000, 5121001, 5121002, 5121003, 5121004, 5121005, 5121007, 5121008, 5121009, 5121010};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 522: {
		int skills[] = {5221000, 5220001, 5220002, 5221003, 5221004, 5221006, 5221007, 5221008, 5221009, 5221010, 5220011};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 2112: {
		int skills[] = {21121000, 21120001, 21120002, 21121003, 21120004, 21120005, 21120006, 21120007, 21121008};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 2217: {
		int skills[] = {22171000, 22170001, 22171002, 22171003, 22171004};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 2218: {
		int skills[] = {22181000, 22181001, 22181002, 22181003};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	} case 3212: {
		int skills[] = {32120000, 32120001, 32121003, 32121004, 32121005, 32121006, 32121007, 32121008, 32121002};
		int len = sizeof(skills)/sizeof(skills[0]);
		for (i=0;i<len;i++) {
			if (skillid == skills[i]) {
				return true;
			}
		}
		break;
	}
	default:
		return false;
		break;
	}
	return false;
}